package com.wang.service.impl;

import com.wang.dao.StudentDao;
import com.wang.domain.Student;
import com.wang.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class StudentServiceImpl implements StudentService {
    @Autowired
    private StudentDao dao;
    @Override
    public int addStudent(Student student) {
        return dao.insertStudent(student);
    }
    @Override
    public List<Student> findStudents() {
        return dao.selectStudent();
    }
    @Override
    public List<Student> findStudentsById(Student student) {
        return dao.selectStudentById(student);
    }
}
